var provinceList = ['四川省', '云南省', '贵州省', '广西省', '广东省'];
var selcity = [
	['成都市', '德阳市', '绵阳市', '广元市', '遂宁市'],
	['昆明市', '大理市', '丽江市'],
	['贵阳市', '遵义市'],
	['南宁市', '桂林市'],
	['广州市', '深圳市', '佛山市', '珠海市', '汕头市']];


function myInit() {
	var provs = document.getElementById("province");
	for (var i = 0; i < provinceList.length; i++) {
		provs.innerHTML += "<option>" + provinceList[i] + "</option>";
	}
}

function loadCity() {
	var prov=document.getElementById("province").value;	
	for (var i = 0; i < provinceList.length; i++) {
		if(prov==provinceList[i]){			
			var cities=document.getElementById("city");
			cities.innerHTML="<option>--请选择--</option>";
	        for(var j=0; j<selcity[i].length;j++){
		    cities.innerHTML +="<option>" + selcity[i][j] + "</option>";
	        }
		}
	}

	
}

window.onload = myInit;
